Skip to content

mxmirror: Avoid perl warning #112

Merged
merged 1 commit into from
Jan 9, 2020
Merged

mxmirror: Avoid perl warning #112

merged 1 commit into from
Jan 9, 2020

Conversation

donald
Copy link
Collaborator

@donald donald commented Jan 9, 2020

When the source jbod is not in mxmounts, we currenty get

**ERROR: unknown jbod: X2083
Use of uninitialized value in concatenation (.) or string at /usr/sbin/mxmirror line 410, <F> line 240.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/mxmirror line 410, <F> line 240.
**ERROR: CAN'T PARSE FROM/TO: X2083 X2076

because the undef result of convert_to_sourcepath is
used by convert_to_destinationpath.

Bark out early when the source path is not parsable.

This changes output to

buczek@pummelfee:~/git/mxtools (master)$ mxmirror/mxmirror
**ERROR: unknown jbod: X2083
**ERROR: CAN'T PARSE FROM: X2083 X2076

When the source jbod is not in mxmounts, we currenty get

    **ERROR: unknown jbod: X2083
    Use of uninitialized value in concatenation (.) or string at /usr/sbin/mxmirror line 410, <F> line 240.
    Use of uninitialized value in concatenation (.) or string at /usr/sbin/mxmirror line 410, <F> line 240.
    **ERROR: CAN'T PARSE FROM/TO: X2083 X2076

because the `undef` result of `convert_to_sourcepath` is
used by `convert_to_destinationpath`.

Bark out early when the source path is not parsable.

This changes output to

    buczek@pummelfee:~/git/mxtools (master)$ mxmirror/mxmirror
    **ERROR: unknown jbod: X2083
    **ERROR: CAN'T PARSE FROM: X2083 X2076
@donald donald merged commit a15ab91 into master Jan 9, 2020
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant